package com.example.payer.api

import com.example.base.app.conts.BaseConst
import com.example.common.view.api.BaseApiServer
import com.example.common.view.model.BaseResultData
import com.example.payer.etity.Payer
import com.example.payer.etity.PayerEntity
import com.example.payer.etity.PostPayerEntity
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Path

interface PayerApiServer:BaseApiServer {
    @GET(BaseConst.GET_PAYER_URL)
    suspend fun getPayer(@Path("payerId")payerId:Int):BaseResultData<List<Payer>>
    @GET(BaseConst.GET_PAYER_DETAIL)
    suspend fun getPayerDetail(@Path("id")id:Int):BaseResultData<Payer>
    @POST(BaseConst.POST_PAYER_URL)
    suspend fun postPayer(@Body body:PostPayerEntity):BaseResultData<PostPayerEntity>
    @PUT(BaseConst.PUT_PAYER_URL)
    suspend fun putPayer(@Path("id")id:Int,@Body body:Payer):BaseResultData<Payer>
}